package com.example.goods_service.service;

import com.example.goods_service.dao.GoodsDao_chenbin;
import com.example.goods_service.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl_chenbin implements GoodsService_chenbin
{
    @Autowired
    GoodsDao_chenbin goodsDao_chenbin;

    @Override
    public List<T_commodity_category> sel_big_leimu() {
        return goodsDao_chenbin.sel_big_leimu();
    }

    @Override
    public List<T_commodity_category> sel_small_leimu() {
        return goodsDao_chenbin.sel_small_leimu();
    }

    @Override
    public List<T_category_attribute> sel_attribute(int category_id) {
        return goodsDao_chenbin.sel_attribute(category_id);
    }

    @Override
    public List<T_attribute_details> sel_details() {
        return goodsDao_chenbin.sel_details();
    }

    @Override
    public List<T_category_config> sel_goodsconfig(int category_id) {
        return goodsDao_chenbin.sel_goodsconfig(category_id);
    }

    @Override
    public List<T_config_details> sel_configdetails() {
        return goodsDao_chenbin.sel_configdetails();
    }

    @Override
    public int add_picture(String s) {
        return goodsDao_chenbin.add_picture(s);
    }

    @Override
    public int add_goods(String goodsname, String goodsjianjie, int leimuid) {
        return goodsDao_chenbin.addgoods(goodsname,goodsjianjie,leimuid);
    }

    @Override
    public List<T_commodity> sel_goodsid(String goodsname) {
        return goodsDao_chenbin.sel_goodsid(goodsname);
    }

    @Override
    public void add_selectedattribute(int attribute_id, int attribute_details_id, int goodsid) {
        goodsDao_chenbin.add_selectedattribute(attribute_id,attribute_details_id,goodsid);
    }

    @Override
    public List<T_config_details> sel_configdetailsid(String o)
    {

        return goodsDao_chenbin.sel_configdetailsid(o);
    }

    @Override
    public int add_selected_config(int id, int config_id, int id1) {
        return goodsDao_chenbin.add_selected_config(id,config_id,id1);
    }

    @Override
    public int add_com_all(int id, String configattibute, Double goodsrice, int stock) {
        return goodsDao_chenbin.add_com_all(id,configattibute,goodsrice,stock);
    }

    @Override
    public void add_goods_pic(String s, int id) {
        goodsDao_chenbin.add_good_pic(s,id);
    }

    @Override
    public void add_com_price(Double pirce, int id) {
        goodsDao_chenbin.add_com_pic(pirce,id);
    }

}
